<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('企业基本信息列表')" />
</head>
<body>
<div class="container-div">
    <div class="row">
        <div class="col-sm-9 about">
            <div class="ibox float-e-margins">
                <div class="ibox-title ibox-title-gray dashboard-header">
                    <h5>企业基本信息</h5>
                </div>
                <div class="ibox-content">
                    <div class="nav-tabs-custom">
                        <ul class="nav nav-tabs">
                            <li class="active"><a href="#company_info" data-toggle="tab" aria-expanded="true">基本资料</a></li>
                        </ul>
                        <div class="tab-content">
                            <!--用户信息-->
                            <div class="tab-pane active" id="company_info">
                                <form class="form-horizontal m" id="formId" th:object="${jibencompany}">
                                    <!--隐藏ID-->
                                    <input name="id" hidden>
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label is-required">身份证或企业代码：</label>
                                            <div class="col-sm-8">
                                                <input name="card"  class="form-control" type="text" required>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label is-required">公司名称：</label>
                                            <div class="col-sm-8">
                                                <input name="name" class="form-control" type="text" required>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">公司简介：</label>
                                            <div class="col-sm-8">
                                                <textarea name="information" class="form-control"></textarea>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">企业性质：</label>
                                            <div class="col-sm-8">
                                                <select name="nature" class="form-control m-b" th:with="type=${@dict.getType('sys_company_nature')}">
                                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">福利待遇：</label>
                                            <div class="col-sm-8">
                                                <input name="welfare" class="form-control" type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label is-required">联系方式：</label>
                                            <div class="col-sm-8">
                                                <input name="contact" class="form-control" type="text" required>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label is-required">有效标记：</label>
                                            <div class="col-sm-8">
                                                <select name="sign" class="form-control m-b" th:with="type=${@dict.getType('sys_company_10')}" required>
                                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-offset-2 col-sm-10" id="toolbar">
                                            <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="rgpp:informationcompany:add">
                                                <i class="fa fa-plus"></i> 添加
                                            </a>
                                            <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="rgpp:informationcompany:edit">
                                                <i class="fa fa-edit"></i> 修改
                                            </a>
                                            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="rgpp:informationcompany:export">
                                                <i class="fa fa-download"></i> 导出
                                            </a>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--<div class="btn-group-sm" id="toolbar" role="group">-->
            <!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="rgpp:informationcompany:add">-->
                <!--<i class="fa fa-plus"></i> 添加-->
            <!--</a>-->
            <!--<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="rgpp:informationcompany:edit">-->
                <!--<i class="fa fa-edit"></i> 修改-->
            <!--</a>-->
            <!--<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="rgpp:informationcompany:remove">-->
                <!--<i class="fa fa-remove"></i> 删除-->
            <!--</a>-->
            <!--<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="rgpp:informationcompany:export">-->
                <!--<i class="fa fa-download"></i> 导出-->
            <!--</a>-->
        <!--</div>-->
        <!--<div class="col-sm-12 select-table table-striped">-->
            <!--<table id="bootstrap-table"></table>-->
        <!--</div>-->


    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="none">
    var editFlag = [[${@permission.hasPermi('rgpp:informationcompany:edit')}]];
    var removeFlag = [[${@permission.hasPermi('rgpp:informationcompany:remove')}]];
    var natureDatas = [[${@dict.getType('sys_company_nature')}]];
    var signDatas = [[${@dict.getType('sys_company_10')}]];
    var prefix = ctx + "rgpp/informationcompany";

    $(function() {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "企业基本信息",
            clickToSelect: true,//点击row任意位置选中复选框
            rememberSelected: true,//记住翻页选择
            columns: [{
                checkbox: true
            },
                {
                    field: 'id',
                    title: '编号',
                    visible: false
                },
                {
                    field: 'card',
                    title: '身份证或企业代码'
                },
                {
                    field: 'name',
                    title: '公司名称'
                },
                {
                    field: 'information',
                    title: '公司简介'
                },
                {
                    field: 'nature',
                    title: '企业性质',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(natureDatas, value);
                    }
                },
                {
                    field: 'welfare',
                    title: '福利待遇'
                },
                {
                    field: 'contact',
                    title: '联系方式'
                },
                {
                    field: 'sign',
                    title: '有效标记',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(signDatas, value);
                    }
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return $.table.dropdownToggle(actions.join(''));
                    }
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>